/**
 * 
 */
package co.microtinto.web.consumer;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import co.microtinto.web.manager.WSServiceLocator;

import com.microtinto.bussines.ejb.ServiceEJBBean;
import com.microtinto.bussines.ejb.ServiceEJBBeanService;

/**
 * @author Yair Ivan
 *
 */
public class ConsumerBean {
	
	private Log log = LogFactory.getLog(ConsumerBean.class);
	private static final String endPoint = "http://127.0.0.1:8888/WebService/ServiceEJBBean?wsdl";
	
	public ConsumerBean() {
	}
	
	public String execute() {
		log.info("Ini ConsumerBean");
		ServiceEJBBeanService service = WSServiceLocator.getInstance().findService(ServiceEJBBeanService.class, endPoint);
		log.info("wsdl servicio: " + service.getWSDLDocumentLocation().toString());
		ServiceEJBBean port = service.getServiceEJBBeanPort();
		port.method();
		log.info("End ConsumerBean");
	    return "";
	}
}
